#!/bin/sh

# erase onboard mass storage device
storage_bus="1-1.3:1.0"
storage_dev=

for i in a b c d e ; do
    if $(ls -l /sys/block/sd$i 2>/dev/null | grep -q "$storage_bus") ; then
        storage_dev="sd$i"
        break
    fi
done

if [ -n "$storage_dev" ] ; then
    erase_mass_storage $storage_dev
fi
